package com.springboot_shopping.utils;

import java.util.Random;

public class OrderNoGenerator {
    public static String generateOrderNo() {
        // 使用时间戳和随机数生成订单号
        long timestamp = System.currentTimeMillis();
        Random random = new Random();
        int randomNumber = random.nextInt(900000) + 100000; // 6位随机数
        return timestamp + "" + randomNumber;
    }
}